Manages the render queues available in the component. More...
Public Member Functions | |
~RenderQueueManager () | |
RenderQueue * | createOrRetrieve (const nkMemory::StringView &name) |
RenderQueue * | get (const nkMemory::StringView &name) const |
RenderQueue * | getByIndex (unsigned int index) const |
void | rename (const nkMemory::StringView &oldName, const nkMemory::StringView &newName) |
void | erase (const nkMemory::StringView &name) |
Static Public Attributes | |
static const nkMemory::StringView | DEFAULT_RENDER_QUEUE = "NILKINS_DEFAULT_RENDER_QUEUE" |
Name of the default base render queue of the component. This queue is used by default by all passes or resources requiring a queue. | |
Manages the render queues available in the component.
The manager owns the memory it allocates. External code should not delete it.
nkGraphics::RenderQueueManager::~RenderQueueManager | ( | ) |
Destructor.
RenderQueue* nkGraphics::RenderQueueManager::createOrRetrieve | ( | const nkMemory::StringView & | name | ) |
Creates if unavailable, or retrieves if available, a render queue.
name | The name of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::get | ( | const nkMemory::StringView & | name | ) | const |
Retrieves a queue.
name | The name of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::getByIndex | ( | unsigned int | index | ) | const |
Retrieves a render queue given an index. Note that as the internal memory is changed, an index can map to different resources over different calls. Mainly used to loop over all queues in one go.
index | The index of the queue to retrieve. |
void nkGraphics::RenderQueueManager::rename | ( | const nkMemory::StringView & | oldName, |
const nkMemory::StringView & | newName | ||
) |
Renames a queue, changing both its name and the way to access it within the manager.
oldName | The name of the queue to change. |
newName | The name to rename it to. |
void nkGraphics::RenderQueueManager::erase | ( | const nkMemory::StringView & | name | ) |
Erases and frees the memory of a render queue.
name | The name of the render queue to erase. |